qmastfandomcom-20200213-history
Version Control
We need a system that will allow the team to work on projects and tasks independently from each other without micromanaging and allowing build-testing and rollbacks to avoid bugs, allow updates of versions and merging, viewing of all versions of code. Why Mercurial is better than Subversion (according to Mercurial): http://hginit.com/ =Eclipse with Mercurial= # Install mercurial. For me this is System->Admin->Add/Remove Software and search for mercurial. Also, there is a windows non-admin version here: http://mercurial.selenic.com/downloads/ # Install Eclipse. I have Galileo version on Linux which I like a lot, for windows I've been installing "Eclipse IDE for C/C++ programmers" from the eclipse download site, I don't like the layout as much - not sure what Galileo for windows corresponds to (maybe "Classic Eclipse"?). # Install the Eclipse mercurial plugin, follow directions here http://javaforge.com/project/HGE ## Start Eclipse ## Help -> Add new software ## Copy the address (http://cbes.javaforge.com/update) from the HGE download site into the Work With bar, click Add, give it an informational title (like Mercurial Plugin Repo). After a second the list of software from that repo appears. ## Click the checkmark next to Mercurial Eclipse ## Click next, accept everything, and finish ## Restart eclipse # Create a gmail account, and tell Christine or Val what it is, and she will add you to the googleCode editors list # Follow this tutorial to clone qmast.google.code http://blogs.intland.com/main/entry/39 to your local computer, make edits, commit changes, push to repo. # Change the C/C++ settings to include *.pde files ## Window->Preferences->C/C++->File Types->New, enter *.pde as a C++ source file # Make changes. # Commit changes frequently. Wrong click on files -> Team -> Commit. Starting with the file name, make useful brief commit comments on what's changed as the file you're working on is built. Fill in your name or pseudonom into the box. # Once you've been added to the editors list for googleCode you can push changes to the online repository. # First add project to synchronize list. Top right corner -> Open Perspective -> Team Synchronizing -> Synchronize -> Mercurial -> qmast -> enter name and GoogleCode password (NOT gmail password, see http://blogs.intland.com/main/entry/39) # Synchronize tab should now show Incoming, Outgoing, Uncommitted lists. Wrong click Outgoing -> Push I added a *.pde filetype to eclipse so it would highlight it and treat it as a C++ file: Window->Preferences->C/C++->File Types and then add *.pde as a C++ source file Using Mercurial Eclipse Some thoughts about what we've learned from experimenting. Start with a tutorial (above) or ask someone if you haven't used it before! *Eclipse seems to be really slow at registering changes of the push/pull/merge variety. Maybe try opening and closing it. *Pull any incoming changes from Google Code first (I think it forced you to if there are both incoming and outgoing changes) *Merge any needed changes. It should show as a conflict with a double sided red arrow. In normal C/C++ perspective, right click on the file, go to team and select merge. (If there are no conflicts, it should just go fine?) If there are changes to the same function that can't peacefully coexist, you need to do it manually by looking, then copying and pasting as required. Then right click on the file -> Team -> Mark as resolved. Everything useful comes from right clicking the file and going to Team. *Don't worry about the .project file being uncommitted. =Google Code= https://code.google.com/p/qmast/ Our project http://blogs.intland.com/main/entry/39 Good tutorial on using google code from eclipse http://code.google.com/p/googlecode-mylyn-connector/ Eclipse task list to google code issue list connector Eclipse for Arduino This would be REALLY COOL but isn't working yet. This is a low priority, but would be REALLY AWESOME. Eclipse for arduino, which has cvs and svn support Eclipse has a Mercurial plugin which allows it to work with Google Code. It also has a Bazaar plugin for launchpad, but apparently Eclipse crashes if ssh requests a password - presently on my computer ssh is requesting a password to unlock keys, even when I re-generated the keys without entering a password (I did enter a password the first time, perhaps it wasn't able to overwrite this password encryption). This is the main forum post for getting Eclipse to compile arduino code, with instructions and comments from users. I run Fedora 13. These are my steps I took to try to get it working. # Follow above directions. # Installing eclipse and the toolchain went fine (sudo yum install instead of apt-get install) except a few packages that I searched for using System->Admin->Add/Remove Software and searching for AVR, as they had different names than indicated (avr-xxx instead of xxx-avr). Installed avr-eclipse as described in the linked page. # I found the header files using whereis arduino. They are in /usr/share/arduino/hardware/arduino/codes/arduino from installing the arduino IDE. This information is important for the project properties configuration below. # Opened arduino IDE and Blink example project, verified. core.a was in /tmp/buildxxxxxxxxx.tmp/ folder. Copied to ~/core.a for now, will copy it into a project folder once the project is created in eclipse. # Started a new C++ project, called arduinoMega2560 # MCU is ATmega2560, frequency is 16MHz see this reference # The project is now created. On the C/C++ projects tab, select arduinoMega2560. Now Project->Properties is available. Follow directions to edit all variables. The core library is the one copied from the Arduino IDE compilation. ## Copy the core.a file to a libxxxx.a file (I used libMega2560.a) into the project directory (for me this was /Documents/Eclipse \Projects/arduinoMega2560/ and use that information (file name without the lib or .a, and the directory) in the last step. # To create a source file to add the suggested function code, File->New->Source File->main.c # I added the pedantic flag # I cant find Project Options-> Libraries to enable the floating point printf libraries # I copied contents of main.cpp from /usr/share/arduino/hardware/arduino/cores/arduino to /Documents/Eclipse \Projects/arduinoMega2560/main.c # Havnt set up any of the support for uploading code # This has errors when I tried to build (doesnt recognize Serial, and all the functions to have c++ compatibility cause errors). Deleted the c++ functions. # Moved to folder EclipseProjects2 to remove the space in the name. Then deleted the Debug folder from inside eclipse, as there were two definitions of main.cpp, and also deleted main.cpp. Serial error reappeared. # Edited Tones.cpp to have "wiring.h" and "pins_arduino.h" rather than and # Still not working, errors. =Launchpad= Bazaar-driven project code repository and feature request form Plugin for bazaar/eclipse integration necessary to save a step using launchpad and eclipse and not really working (could just test in eclipse and then bzr the files) Version control software tracks changes. Launchpad also tracks bugs and allows descriptions of future features (which I've setup as our major tasks, though I'm sure there are other ways to do it). Good directions for creating local branches on launchpad with bazaar QMAST on launchpad This is our project. Bazaar on my computer seems very tempermental with when it will allow me to push - it worked well directly after booting, and pushed once. bzr push --use-existing lp:qmast Category:Software